package com.zhangbo.study.designpatternlearning.factory.store;

import com.zhangbo.study.designpatternlearning.factory.Pizza;
import com.zhangbo.study.designpatternlearning.factory.PizzaEnum;
import com.zhangbo.study.designpatternlearning.factory.PizzaStore;
import com.zhangbo.study.designpatternlearning.factory.pizza.ny.NYStyleCheesePizza;
import com.zhangbo.study.designpatternlearning.factory.pizza.ny.NYStyleClamPizza;
import com.zhangbo.study.designpatternlearning.factory.pizza.ny.NYStylePepperoniPizza;
import com.zhangbo.study.designpatternlearning.factory.pizza.ny.NYStyleVeggiePizza;

public class NYStylePizzaStore extends PizzaStore {
    @Override
    public Pizza createPizza(PizzaEnum pizzaEnum) {
        switch (pizzaEnum) {
            case CHEESE:
                return new NYStyleCheesePizza();
            case VEGGIE:
                return new NYStyleVeggiePizza();
            case CLAM:
                return new NYStyleClamPizza();
            case PEPPERONI:
                return new NYStylePepperoniPizza();
        }

        return null;
    }
}
